package com.pwt.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
@Schema(name = "用户授权模型")
public class UserGrantsModel {
    @Schema(name = "userId",description = "用户ID")
    @NotBlank(message = "用户ID不能为空")
    private String userId;

    @Schema(name = "roleIds",description = "角色ID")
    @NotNull(message = "角色ID不能为空")
    @Size(min = 1,message = "角色ID不能为空")
    private List<String> roleIds;
}
